import service from '@/utils/request'
// @Tags SeckillActivity
// @Summary 创建秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SeckillActivity true "创建秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /seckillActivity/createSeckillActivity [post]
export const createSeckillActivity = (data) => {
  return service({
    url: '/seckillActivity/createSeckillActivity',
    method: 'post',
    data
  })
}

// @Tags SeckillActivity
// @Summary 删除秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SeckillActivity true "删除秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /seckillActivity/deleteSeckillActivity [delete]
export const deleteSeckillActivity = (params) => {
  return service({
    url: '/seckillActivity/deleteSeckillActivity',
    method: 'delete',
    params
  })
}

// @Tags SeckillActivity
// @Summary 批量删除秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /seckillActivity/deleteSeckillActivity [delete]
export const deleteSeckillActivityByIds = (params) => {
  return service({
    url: '/seckillActivity/deleteSeckillActivityByIds',
    method: 'delete',
    params
  })
}

// @Tags SeckillActivity
// @Summary 更新秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data body model.SeckillActivity true "更新秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /seckillActivity/updateSeckillActivity [put]
export const updateSeckillActivity = (data) => {
  return service({
    url: '/seckillActivity/updateSeckillActivity',
    method: 'put',
    data
  })
}

// @Tags SeckillActivity
// @Summary 用id查询秒杀活动
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query model.SeckillActivity true "用id查询秒杀活动"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /seckillActivity/findSeckillActivity [get]
export const findSeckillActivity = (params) => {
  return service({
    url: '/seckillActivity/findSeckillActivity',
    method: 'get',
    params
  })
}

// @Tags SeckillActivity
// @Summary 分页获取秒杀活动列表
// @Security ApiKeyAuth
// @Accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取秒杀活动列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /seckillActivity/getSeckillActivityList [get]
export const getSeckillActivityList = (params) => {
  return service({
    url: '/seckillActivity/getSeckillActivityList',
    method: 'get',
    params
  })
}

// @Tags SeckillActivity
// @Summary 不需要鉴权的秒杀活动接口
// @Accept application/json
// @Produce application/json
// @Param data query seckillReq.SeckillActivitySearch true "分页获取秒杀活动列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /seckillActivity/getSeckillActivityPublic [get]
export const getSeckillActivityPublic = (params) => {
  return service({
    url: '/seckillActivity/getSeckillActivityPublic',
    method: 'get',
      params
  })
}
